package com.visitor.demo1.impl;

import com.visitor.demo1.Visitor;

public class VisitB implements Visitor{
    public void visit(NodeA nodeA){
        System.out.println("***visitB***");
        nodeA.action();
    }
    public void visit(NodeB nodeB){
        System.out.println("***visitB***");
        nodeB.action();
    }
}